The prediction of tides is important to anyone involved in coastal ocean activities such as surfing, diving, fishing, or boating. A calendar is a convenient way of presenting the tide information on a day-to-day basis. It is easy to quickly see the general magnitude and times of the tide extremes. The Tide Calendar Program will calculate ocean tide heights from 1990 through the year 2025 for coastal stations in the continental United States, Alaska, and Hawaii, or Mexico. The tide curve is calculated hourly for a complete month and displayed on a calendar grid. The calendar also shows the times of sunrise and sunset on the first and last day of the month, the quarterly phases of the moon, and the times of the solstice or equinox if they occur. In addition, a file containing the hourly tide heights, or the times of high and low tides can be created.
The predictions for the Mexico stations in this version of the program are sometimes less accurate. Often, these predictions are based on a slightly different set of constituents than are normally used by the National Ocean Survey for US stations (and used by the Tide Calendar program). Often values of particular minor constituents have been approximated. Additional constituent factors may be included in later versions of the program.
This demonstration version will calculate calendars through June 1994 only. It will run on all Macintosh computers, Mac Plus or above, using system software 6.07 or greater. A floating point processor is not required. The complete program contains data for the years 1990 to 2025 and is available for $35. A Version compiled for machines capable of 68020 and 68881 instructions is also included. On such computers, this code will run significantly faster than the "demo" version.
2. New Features
Several significant improvements have been incorporated in version 2.0. The program will now perform tide calculations at any requested location based on the constituents at two adjacent reference stations. This will probably give a better approximation to the tide curve than simply using a constant time shift or scaling factor from one reference station. The printing code has been improved and now the calendar will be printed at the highest resolution of the chosen printer. Variable line thicknesses can be specified for the calendar frame, the tide curve, and the grid scale. Finally, data for years 2001 to 2025 have been added to the program.
3. Program Operation
The use of this program is quite straight forward. The desired geographical region is chosen from the Region Menu and a particular station is chosen from the Station Menu. A map showing the location of all the stations in the given set can be displayed. The Options... selection in the Calendar Menu is used to set the vertical scale for the tide curves and the dimensions and appearance of the calendar.
• File Menu
Save Highs & Lows
This menu option is activated if a calendar has been created. The times and heights of high and low tides for each day in the selected month are written to a disk file. A dialog box is presented for the name of a file.
Save Hourly Tide Heights
This menu option is activated if a calendar has been created. The tide height at each hour in the selected month is written to a disk file. The time in hours is given relative to the start of the month. A dialog box is presented for the name of a file.
Page Setup...
The usual dialog to set the printing conditions. The height and width of the calendar must be consistent with the paper dimensions of the printer and the orientation of the page.
Print Calendar
The usual dialog to start printing. The calendar is a complex data structure and the printing can be time consuming. When printing to a 600 dpi printer, it may be necessary to increase the program size to obtain the entire calendar. This is easily done from the Finder.
Quit
Quit the program. This is also achieved by closing the main window.
• Region Menu
Region
The user specifies one of six geographical regions (West Coast, East Coast, Gulf Coast, Alaska, Hawaii, or Mexico) with a corresponding set of tidal stations to choose from. The Station menu will be adjusted to show these stations and the appropriate map. After selecting a new region, a particular station must then be selected to activate the Draw Calendar function.
• Station Menu
Map...
Draws a map of the geographical region and shows the locations of all the stations available. The map is a conic projection and the latitude and longitude of the cursor is displayed. If the mouse button is pressed, the coordinates are saved and displayed to the right of the variable coordinates. This is designed to assist the user when the location of a new station is required (see below). Although the coordinates of the reference stations are accurate, the map is only approximate, and therefore the displayed coordinates are approximate.
Add New Station...
This feature is new in version 2.0. Latitude and longitude coordinates are entered for the desired location and tidal constituents are determined from a linear interpolation between existing (reference) stations. This approximation is appropriate when the coastal path between the three locations is relatively straight and unobstructed. The coordinates can be pasted from values stored from the map window (see above). The map coordinates are approximate and it is preferable to enter the exact coordinates if known. The algorithm for calculating the value of constituent Z at location X in terms of the distances projected on the straight line connecting stations A and B, is
ZX = F(ZA dXB + ZB dXA,dAB ) .
The two closest existing stations will be determined, if desired. In any case, the user is free to directly enter the names of either reference station. For this purpose, it is convenient to have the map window displayed and positioned relative to the dialog box so that station names are visible.
<Important> Often the two closest stations are not the 'best' choices for the interpolation. This is apparent in the following figure.
Stations A and C are geographically closer to X than station B, however since the distance from either A or C to X is much larger than the distance A to C, the extrapolated (in this case) constituent values would be very sensitive to small variations in the constituents between A and C. Interpolation based on stations A and B would probably give a better approximation to the tide curve at X. If two valid station names are entered, the interpolation button is activated. If selected, a window is opened and the constituent factors for the reference stations and the interpolated values are shown. Z0 is the datum or average water height above mean lower low tide, etc. All calculated negative values are clipped to zero since they must be positive. The mouse button is clicked once and the phases from 0 to 360 degrees are shown. Another click and the user is prompted for a station name and a comment string. The name will appear in the Station menu and at the bottom of the calendar. The comment string is stored in the station resource. The time zone is assumed to be the same as the closest reference station which is most likely correct, although not necessarily! The new station is then added as a resource to the program and will appear in the Station menu and the map display.
Remove Station...
The specified station resource will be permanently removed from the program. This allows the user to practice adding stations (see above) and avoid accumulating everything in the station list. ResEdit cav also be used to remove or add stations from a backup program copy. The station resources appear as types 'Wsta' for west coast, 'Esta' for east coast, 'Asta' for Alaska, 'Gsta' for gulf coast, 'Hsta' for Hawaii, and 'Msta' for Mexico.
Tide Station
Specifies the station with the appropriate tidal constants for the tide curve calculation. The latitude and longitude of the station are used for the astronomical calculations.
• Month Menu
Month
The calendar month. Set to the current month at start up.
Print All Year
This option allows a complete year of 12 calendars to be drawn and printed. The specified station, year, and all the options specified in the Options... dialog will be used. After Draw Calendar is selected, a standard print dialog is presented. The monthly calendars are then calculated in sequence and sent to the printer. This may take several minutes and it is strongly suggested that one month be printed first to verify that all settings are correct.
• Year Menu
Year
Specifies the year in the range 1990 - 2025.
• Calendar Menu
Draw Calendar
Draw the calendar and calculated tide curve for the specified station and month using the current values from the Options... dialog (see below).
Fit to Window
Changes the display of the calendar in the window. The calendar is either drawn to fit the window or at the size specified in the Options... dialog box. This can be changed by checking or unchecking this option. In either case, the printed calendar will have the dimensions specified.
Options...
This dialog box allows the user to control the size and appearance of the calendar. These options are saved as a resource and used the next time the program is run. The height and width of the outside calendar frame are specified in inches. The vertical scale of the tide curves is set by entering the minimum, maximum, and increment in feet. After some trial and error, appropriate values can be determined, depending on the preferences of the user. For a particular station, these values will not need to be changed from month to month. If the Auto box is checked, the calendar will be initially drawn with the current scale settings, then reasonable values will be calculated so that the tide curve fits well inside the calendar grid. If these new values are different from the current settings, the current settings will be updated and the calendar will be re-drawn with these scale settings.
The user can specify if the times and values of the maximum and minimum tide heights should be calculated and displayed below the day boxes. With the initial font settings, the calendar width should be at least ~7 inches to give adequate room for these. Daylight savings time can be incorporated in the tide curve and astronomical calculations if desired. The tide curve will then be shifted one hour ahead from the first Sunday in April at 2:00 AM until the last Sunday in October at 2:00 AM. The output in the written files is similarly affected.
A provision has been made to allow the user to arbitrarily shift the time of the tide curve and/or scale the tide amplitude relative to values for the selected reference station. This is useful if it is desired to fine tune the calendar to local conditions. The default values, used whenever a new reference station is chosen, are 0 minute shift and scale factor of 1.0. If these are changed, the corrections are noted at the bottom of the calendar and also at the head of any written files.
If the box Draw Calendar at Start-Up is checked, the calendar for the current station, month and year will indeed be drawn automatically when the program is run.
The line thickness of the calendar frame, tide curve, and scale grid can be entered as a percentage of a screen pixel unit (1/72 inch). Fine thickness variations are possible with printers having high resolution. For example, when printing to a 300 dot per inch laser writer, ~25% increments can be used.
4. Calendar Text Appearance
The Tide Calendar program is initially configured to use Geneva 9,12,20, and 36 point and Helvetica 9 point fonts for the various text strings in the calendar. For the best screen appearance, these fonts must exist in the system file. The required fonts, sizes, and styles can be changed by modifying the 'Cldr' resource in the program. This is easily done with ResEdit (a Apple program available free from on-line services). The 'Cldr' resource should initially look like the following.
The entries that determine the text appearance are highlighted above. Each entry consists of three consecutive 2-byte values for the font type, style, and point size. Entries (in Hex) for the various text strings begin at the following locations.
34 Month & Year
3A Day of week
40 Day numbers
46 -- not used --
4C Sunrise & Sunset times, Solstice, Equinox
52 Highs/Lows & times
58 Station
5E Tide scale
The possible font types include the following.
systemFont 0x0000
applFont 0x0001
newYork 0x0002
geneva 0x0003
monaco 0x0004
venice 0x0005
london 0x0006
athens 0x0007
sanFran 0x0008
toronto 0x0009
cairo 0x000B
losAngeles 0x000C
times 0x0014
helvetica 0x0015
courier 0x0016
The possible style values are
normal 0x0000
bold 0x0100
italic 0x0200
underline 0x0400
outline 0x0800
shadow 0x1000
condense 0x2000
extend 0x4000
5. Further Information
Tidal curves are calculated from data supplied by the National Ocean Service. The heights are given relative to the mean of the daily lower low tide. The data consist of amplitudes and phases for up to 37 harmonic constituents whose frequencies are accurately determined from astronomical motions of the earth and moon relative to the sun. These data are obtained from measurements of the sea level at a particular location or station over a long period of time. The predicted tide height is generally accurate to within a few percent and the time of the tidal extreme should be accurate to within a few minutes. The mathematical description can be found in many sources including the following.
Manual of Harmonic Analysis and Prediction of Tides
Paul Schureman
Special Publication No. 98
U.S. Department of Commerce
Coast and Geodetic Survey
Computer Applications to Tides in the National Ocean Survey
U.S. Department of Commerce
National Oceanic and Atmospheric Administration
National Ocean Survey
These publications are available from:
National Ocean Service
Tide and Current Predictions
1305 East West Hwy.
Silver Springs, MD 20910
Any questions, comments or suggestions are appreciated. Send e-mail to proteus@aol.com (America Online) or write to Proteus Software at the address below. The complete program including data through the year 2025 is available for $35.